<!--
 * @Descripttion: 
 * @version: 
 * @Author: ye_zhiguo
 * @Date: 2021-08-23 09:22:19
 * @LastEditTime: 2021-08-24 14:59:45
-->
<template>
    <div id="deviceSearchList">
        <div class="bg-title">
            <Theader :title="title"  :headerStyle="{color:'#fff'}" :textStyle="{color:'#fff'}" :titleStyle="{color:'#fff'}">
                <template slot="header_arrow">
                    <van-icon size="25" name="arrow-left"  @click="back" />
                </template>
            </Theader>
        </div>
        <div class="main-box">
            <div class="bg-title-bottom"></div>
            <div class="main-out">
                <div v-for="(item,i) in searchList" :key="i" class="main-in" @click="toSearch(i)">
                    <div class="flex-btw">
                        <img :src="item.url" style="width:2.5rem;height:2.5rem;">
                        <span class="custom-title">{{item.text}}</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import Theader from '../component/header.vue'
export default {
    data(){
        return{
            title:'信息查询',
            searchList:[{
                text:'设备台账查询',
                url:require('../../images/image261-device.png')
            },{
                text:'运维值班查询',
                url:require('../../images/image261-pmduty.png')
            },{
                text:'巡视计划查询',
                url:require('../../images/image261-tourplan.png')
            },{
                text:'缺陷隐患查询',
                url:require('../../images/image261-defect.png')
            },{
                text:'故障信息查询',
                url:require('../../images/image261-fault.png')
            }]
        }
    },
    methods:{
        /**
        * @description: 返回
        * @param {*}
        * @return {*}
        */         
        back() {
            this.$router.push({
                name:'tour',
            })
        },
        /**
        * @description: 查询页面跳转
        * @param {*}
        * @return {*}
        */         
        toSearch(i) {
            switch(i){
                case 0:
                    this.$router.push({
                    name:'deviceRecordSearch',
                    });break;
                case 1:console.log(i);break;
                case 2:console.log(i);break;
                case 3:console.log(i);break;
                case 4:console.log(i);break;
            }
        },
    },
    components:{
        Theader
    }
}
</script>

<style>
#deviceSearchList .bg-title{
    height: 45px;
    width: 100%;
    background: #10B296;
}
#deviceSearchList .bg-title-bottom{
    height: 45px;
    width: 100%;
    background: #10B296;
}
#deviceSearchList .bg-title .van-icon-arrow-left::before{
  color: #fff;
}
#deviceSearchList .flex-btw{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    width: 150px;
}
#deviceSearchList .main-box{
    height: calc(100vh - 45px);
    background: #F5F6F7;
}
#deviceSearchList .main-in{
    padding: 10px;
    padding: 30px 20%;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 5px;
    position: relative;
    top: -45px;
}
#deviceSearchList .main-out{
    padding: 10px;
    /* background: #F5F6F7; */

}
</style>
